/**
 * created by 小卷毛, 2020/10/23
 * Copyright (c) 2020, 416143467@qq.com All Rights Reserved.
 * #                   *********                            #
 * #                  ************                          #
 * #                  *************                         #
 * #                 **  ***********                        #
 * #                ***  ****** *****                       #
 * #                *** *******   ****                      #
 * #               ***  ********** ****                     #
 * #              ****  *********** ****                    #
 * #            *****   ***********  *****                  #
 * #           ******   *** ********   *****                #
 * #           *****   ***   ********   ******              #
 * #          ******   ***  ***********   ******            #
 * #         ******   **** **************  ******           #
 * #        *******  ********************* *******          #
 * #        *******  ******************************         #
 * #       *******  ****** ***************** *******        #
 * #       *******  ****** ****** *********   ******        #
 * #       *******    **  ******   ******     ******        #
 * #       *******        ******    *****     *****         #
 * #        ******        *****     *****     ****          #
 * #         *****        ****      *****     ***           #
 * #          *****       ***        ***      *             #
 * #            **       ****        ****                   #
 */
package com.sgcc.pda.mdrh.task

import android.app.Service
import android.content.Intent
import android.os.Binder
import com.sgcc.pda.mdrh.task.util.sendBlueData

/**
 * 描 述：
 * 作 者：小卷毛  2020-10-23 11:23
 * 修改描述：
 * 修 改 人：
 * 修改版本：
 */
class MonitorService : Service() {

    private lateinit var binder: MonitorBinder

    abstract class MonitorBinder : Binder() {
        abstract fun getService(): MonitorService
    }

    override fun onBind(intent: Intent?) = binder

    override fun onCreate() {
        super.onCreate()
        binder = object : MonitorBinder() {
            override fun getService() = this@MonitorService
        }
    }

    fun observeFrameDevice(frame: String) {
        sendBlueData(
            source = frame,
            onSuccess = {},
            onFailed = {}
        )
    }

    fun observeFrameTask(frame: String) {
        sendBlueData(
            source = frame,
            onSuccess = {},
            onFailed = {}
        )
    }

}